// 获取localStorage
export function getStore(name: string) {
  if (!name) return
  return window.localStorage.getItem(name)
}

// 存储localStorage
export function setStore(name: string, content: any) {
  if (!name) return
  if (typeof content !== 'string') {
    content = JSON.stringify(content);
  }
  window.localStorage.setItem(name, content);
}

// 删除localStorage
export function removeStore(name: string) {
  if (!name) return
  window.localStorage.removeItem(name);
}
